home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
051-075
/
disk_069
/
sb
/
sbmsgport.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
2KB
|
61 lines
/* module written by G. Gagnon, Mar 24, 1987 */
#include "sb:sb.h"
extern int level;
void PrMsgPort(string, msgport) char *string; struct MsgPort *msgport;
{
static struct StructData structdata[] = {
{ "-mp_Node", "Node structure", 0, 0 },
{ " .ln_Succ", "struct Node *", 5, PTRSIZE },
{ " .ln_Pred", "struct Node *", 5, PTRSIZE },
{ "- .ln_Type", "UBYTE", 13, BYTESIZE },
{ "- .ln_Pri", "BYTE", 3, BYTESIZE },
{ " .ln_Name", "CHAR *", 4, PTRSIZE },
{ "-mp_Flags", "UBYTE", 13, BYTESIZE },
{ "-mp_SigBit", "UBYTE", 13, BYTESIZE },
{ "(mp_SigTask", "struct Task *)", 5, PTRSIZE },
{ "-mp_MsgList", "List structure", 0, 0 },
{ " .lh_Head", "struct Node *", 5, PTRSIZE },
{ " .lh_Tail", "struct Node *", 5, PTRSIZE },
{ " .lh_TailPred", "struct Node *", 5, PTRSIZE },
{ "- .lh_Type", "UBYTE", 13, BYTESIZE },
{ "- .l_pad", "UBYTE", 13, BYTESIZE }
};
int sum, choice = -1;
level++;
while (choice) {
sum = SetOptionText(string, structdata, (APTR)msgport, DATASIZE, 0);
switch (choice = GetChoice(DATASIZE)) {
case 2:
if (msgport->mp_Node.ln_Succ)
PrNode("MsgPort->mp_Node.ln_Succ", msgport->mp_Node.ln_Succ);
break;
case 3:
if (msgport->mp_Node.ln_Pred)
PrNode("MsgPort->mp_Node.ln_Pred", msgport->mp_Node.ln_Pred);
break;
case 6:
PrString("mp_Node->ln_Name",msgport->mp_Node.ln_Name);
break;
case 11:
if (msgport->mp_MsgList.lh_Head)
PrNode("MsgPort->mp_MsgList.lh_Head", msgport->mp_MsgList.lh_Head);
break;
case 12:
if (msgport->mp_MsgList.lh_Tail)
PrNode("MsgPort->mp_MsgList.lh_Tail", msgport->mp_MsgList.lh_Tail);
break;
case 13:
if (msgport->mp_MsgList.lh_TailPred)
PrNode("MsgPort->mp_MsgList.lh_TailPred", msgport->mp_MsgList.lh_TailPred);
break;
}
}
level--;
}